<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<div class="page_left">
<ul class="equipment_leftu1">
    <li>
        <a href="javascript:;" class="${cur.getMessage() eq 'onLine'?'cur':''}">在线</a>
        <ul class="equipment_leftu2" style="${cur.getMessage() eq 'onLine'?"display:block":"display: none"}">
            <c:forEach items="${placeList}" var="data">
                <li><a href="javascript:;" name="${data.placeid}" viewStats="onLine" class="${data.placeid eq placeId and cur.getMessage() eq 'onLine'?"cur":""}" >${data.address}</a></li>
            </c:forEach>
        </ul>
    </li>
    <li>
        <a href="javascript:;" class="${cur.getMessage() eq 'offLine'?'cur':''}">离线</a>
        <ul class="equipment_leftu2" style="${cur.getMessage() eq 'offLine'?"display:block":"display: none"}">
            <c:forEach items="${placeList}" var="data">
                <li><a href="javascript:;" name="${data.placeid}" viewStats="offLine" class="${data.placeid eq placeId and cur.getMessage() eq 'offLine'?"cur":""}" >${data.address}</a></li>
            </c:forEach>
        </ul>
    </li>
    <li>
        <a href="javascript:;" class="${cur.getMessage() eq 'disabled'?'cur':''}">禁用</a>
        <ul class="equipment_leftu2" style="${cur.getMessage() eq 'disabled'?"display:block":"display: none"}">
            <c:forEach items="${placeList}" var="data">
                <li><a href="javascript:;" name="${data.placeid}" viewStats="disabled" class="${data.placeid eq placeId and cur.getMessage() eq 'disabled'?"cur":""}">${data.address}</a></li>
            </c:forEach>
        </ul>
    </li>
    <li>
        <a href="javascript:;" class="${cur.getMessage() eq 'fault'?'cur':''}">故障</a>
        <ul class="equipment_leftu2" style="${cur.getMessage() eq 'fault'?"display:block":"display: none"}">
            <c:forEach items="${placeList}" var="data">
                <li><a href="javascript:;" name="${data.placeid}" viewStats="fault" class="${data.placeid eq placeId and cur.getMessage() eq 'fault'?"cur":""}">${data.address}</a></li>
            </c:forEach>
        </ul>
    </li>
</ul>
</div>
<script type="application/javascript">
    $(".equipment_leftu2>li>a").on("click", function(){
        $(".equipment_leftu2>li>a").removeClass("cur");
        $(this).addClass("cur");
        var place = $(this).attr("name");
        var viewStats = $(this).attr("viewStats");
        window.location.href = "${basePath}v2/device/"+place+"/showView/"+viewStats;
    });
</script>